<?php

/**
 * PluginShopCaddy form.
 *
 * @package    ##PROJECT_NAME##
 * @subpackage form
 * @author     ##AUTHOR_NAME##
 * @version    SVN: $Id: sfDoctrineFormPluginTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
abstract class PluginShopCaddyForm extends BaseShopCaddyForm
{
	public function setup()
  {
	  parent::setup();
	   $this->useFields(array('statut', 'product_id', 'buy_id' )); 
	   $this->setWidget('product_id', new sfWidgetFormInputHidden());
	   $this->setWidget('buy_id', new sfWidgetFormInputHidden());
	    $this->setWidget('statut', new sfWidgetFormInputHidden());
	   
	   $this->setValidators(array(
       'id'    => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
      'statut' => new sfValidatorInteger(),
      'product_id'  => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('ShopProduct'))),
      'buy_id'      => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('sfGuardUser'))),
    ));
	  
	  
  }
	
	
	
}
